home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1477 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  932 b 

  1. Path: ohstpy.mps.ohio-state.edu!vancleef
  2. From: vancleef@ohstpy.mps.ohio-state.edu
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Why use private class members instead of protected?
  5. Message-ID: <1996Jan11.022904.8720@ohstpy>
  6. Date: 11 Jan 96 02:29:04 -0500
  7. References: <30F4AB49.6ABB@sierra.net>
  8. Organization: The Ohio State University, Department of Physics
  9.  
  10. In article <30F4AB49.6ABB@sierra.net>, TGColwell <snowbull@sierra.net> writes:
  11. > I'm relatively new to c++.  I have one quick question:  If child 
  12. > classes can only access protected members of the parent class, 
  13. > why make any members of any class private?  Wouldn't it be 
  14. > better to make members of the parent class protected so that the 
  15. > class is alway "inheritance ready"?
  16.  
  17.  
  18.  
  19.  
  20. Because you may only want access to the 'private' members
  21. through a specific reference to that bnode?
  22.  
  23. I actually ran into a case where I needed this.
  24.  
  25. -Garrett
  26. > Thanks in advance,
  27. > -Tyler
  28.